package cn.tedu.pojo;/**
 * @Author 金帮嘉诚 @Date 2021-07-14 星期三 10:02
 */
/*本类用于测试*/

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 知识点
 */
public class Car {
    //要用引用类型 不然容易抛异常
    private Integer id;
    private String user;
    private String color;
    private String type;
    private Double price;
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date date;

    public Car() {
    }

    public Car(Integer id, String user, String color, String type, Double price, Date date) {
        this.id = id;
        this.user = user;
        this.color = color;
        this.type = type;
        this.price = price;
        this.date = date;
    }


    @Override
    public String toString() {
        return "Car{" +
                "id=" + id +
                ", user='" + user + '\'' +
                ", color='" + color + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", date=" + date +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String name) {
        this.user = user;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
